package com.savitar.menu.entity;

import java.util.List;

public class MenuVo extends Menu {
    private List<MenuVo> children;
    private boolean isLeaf;

    public List<MenuVo> getChildren() {
        return children;
    }

    public void setChildren(List<MenuVo> children) {
        if (children == null || children.isEmpty()) {
            this.isLeaf = true;
        }
        this.children = children;
    }

    public boolean isLeaf() {
        return isLeaf;
    }

    public void setLeaf(boolean leaf) {
        isLeaf = leaf;
    }
}
